<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<z-pop ref="maskSuccess"
			@submit="submit" @clickImage="clickImage" :maskBg="popConfig.image"></z-pop>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				popConfig: {
					appId: "wxde8ac0a21135c07d",
					url: "index/pages/h5/h5?f_openId=0&noshare=1&weburl=https%3A%2F%2Fclick.meituan.com%2Ft%3Ft%3D1%26c%3D2%26p%3DyEpD6b5zQHG5&f_userId=0&f_token=0",
					image: "https://mp-1e50284a-1bd6-488c-a3ba-f5c89a77d0b2.cdn.bspapp.com/5451723014815_.pic.jpg"
				},
			}
		},
		onLoad() {
			this.$refs.maskSuccess.open()
		},
		methods: {
			submit() {
				console.log("submit");
			},
			clickImage() {
				wx.navigateToMiniProgram({
					appId: this.popConfig.appId,
					path: this.popConfig.url,
					success(res) {
						// 打开成功
						console.log(res);
					}
				})
			},
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
